import { Button } from "antd";
import cls from "classnames";
import { twMerge } from "tailwind-merge";

import { IconButtonProps } from "./interface";

function IconButton({ className, onClick, children }: IconButtonProps) {
    const clsName = cls("bg-shallow dark:bg-[rgb(41,49,79)] text-primary w-[34px] text-[16px] h-[34px] flex items-center justify-center rounded-[8px] select-none cursor-pointer", className);

    return (
        <Button
            className={twMerge(clsName)}
            onClick={onClick}
            type="primary"
        >
            {children}
        </Button>
    );
}

export default IconButton;
